//
//  CunsomStrokeLabel.m
//  BuxProject
//
//  Created by iOS的 on 2021/12/5.
//  Copyright © 2020 Moitnea. All rights reserved.
//

#import "CunsomStrokeLabel.h"
#import "UIColor+Util.h"
@implementation CunsomStrokeLabel

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (void)drawTextInRect:(CGRect)rect
{
    //描边
    CGContextRef c = UIGraphicsGetCurrentContext ();
    CGContextSetLineWidth (c, 1);
    CGContextSetLineJoin (c, kCGLineJoinRound);
    CGContextSetTextDrawingMode (c, kCGTextStroke);
    //描边颜色
    self.textColor = [UIColor colorWithHex:0xFF5479];
    [super drawTextInRect:rect];
    //文字颜色
    self.textColor = [UIColor whiteColor];
    CGContextSetTextDrawingMode (c, kCGTextFill);
    [super drawTextInRect:rect];

}

@end
